.class Lcom/brixd/niceapp/activity/NiceAppSettingActivity$SettingAdapter;
.super Landroid/widget/BaseAdapter;
.source "NiceAppSettingActivity.java"


# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Lcom/brixd/niceapp/activity/NiceAppSettingActivity;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x2
    name = "SettingAdapter"
.end annotation


# instance fields
.field private mSettingItems:Ljava/util/ArrayList;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/ArrayList",
            "<",
            "Lcom/brixd/niceapp/activity/NiceAppSettingActivity$SettingItem;",
            ">;"
        }
    .end annotation
.end field

.field final synthetic this$0:Lcom/brixd/niceapp/activity/NiceAppSettingActivity;


# direct methods
.method public constructor <init>(Lcom/brixd/niceapp/activity/NiceAppSettingActivity;Ljava/util/ArrayList;)V
    .registers 3
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/util/ArrayList",
            "<",
            "Lcom/brixd/niceapp/activity/NiceAppSettingActivity$SettingItem;",
            ">;)V"
        }
    .end annotation

    .prologue
    .line 300
    .local p2, "settingItems":Ljava/util/ArrayList;, "Ljava/util/ArrayList<Lcom/brixd/niceapp/activity/NiceAppSettingActivity$SettingItem;>;"
    iput-object p1, p0, Lcom/brixd/niceapp/activity/NiceAppSettingActivity$SettingAdapter;->this$0:Lcom/brixd/niceapp/activity/NiceAppSettingActivity;

    invoke-direct {p0}, Landroid/widget/BaseAdapter;-><init>()V

    .line 301
    iput-object p2, p0, Lcom/brixd/niceapp/activity/NiceAppSettingActivity$SettingAdapter;->mSettingItems:Ljava/util/ArrayList;

    .line 302
    return-void
.end method


# virtual methods
.method public getCount()I
    .registers 2

    .prologue
    .line 306
    iget-object v0, p0, Lcom/brixd/niceapp/activity/NiceAppSettingActivity$SettingAdapter;->mSettingItems:Ljava/util/ArrayList;

    invoke-virtual {v0}, Ljava/util/ArrayList;->size()I

    move-result v0

    return v0
.end method

.method public getItem(I)Ljava/lang/Object;
    .registers 3
    .param p1, "position"    # I

    .prologue
    .line 311
    iget-object v0, p0, Lcom/brixd/niceapp/activity/NiceAppSettingActivity$SettingAdapter;->mSettingItems:Ljava/util/ArrayList;

    invoke-virtual {v0, p1}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v0

    return-object v0
.end method

.method public getItemId(I)J
    .registers 4
    .param p1, "position"    # I

    .prologue
    .line 316
    int-to-long v0, p1

    return-wide v0
.end method

.method public getView(ILandroid/view/View;Landroid/view/ViewGroup;)Landroid/view/View;
    .registers 13
    .param p1, "position"    # I
    .param p2, "convertView"    # Landroid/view/View;
    .param p3, "parent"    # Landroid/view/ViewGroup;

    .prologue
    const/16 v5, 0x8

    .line 321
    iget-object v6, p0, Lcom/brixd/niceapp/activity/NiceAppSettingActivity$SettingAdapter;->mSettingItems:Ljava/util/ArrayList;

    invoke-virtual {v6, p1}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v3

    check-cast v3, Lcom/brixd/niceapp/activity/NiceAppSettingActivity$SettingItem;

    .line 323
    .local v3, "item":Lcom/brixd/niceapp/activity/NiceAppSettingActivity$SettingItem;
    if-nez p2, :cond_1a

    .line 324
    iget-object v6, p0, Lcom/brixd/niceapp/activity/NiceAppSettingActivity$SettingAdapter;->this$0:Lcom/brixd/niceapp/activity/NiceAppSettingActivity;

    # getter for: Lcom/brixd/niceapp/activity/NiceAppSettingActivity;->mContext:Landroid/content/Context;
    invoke-static {v6}, Lcom/brixd/niceapp/activity/NiceAppSettingActivity;->access$100(Lcom/brixd/niceapp/activity/NiceAppSettingActivity;)Landroid/content/Context;

    move-result-object v6

    const v7, 0x7f030074

    const/4 v8, 0x0

    invoke-static {v6, v7, v8}, Landroid/view/View;->inflate(Landroid/content/Context;ILandroid/view/ViewGroup;)Landroid/view/View;

    move-result-object p2

    .line 327
    :cond_1a
    const v6, 0x7f0a002f

    invoke-virtual {p2, v6}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v2

    check-cast v2, Landroid/widget/ImageView;

    .line 328
    .local v2, "icon":Landroid/widget/ImageView;
    const v6, 0x7f0a0034

    invoke-virtual {p2, v6}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v4

    check-cast v4, Landroid/widget/TextView;

    .line 330
    .local v4, "title":Landroid/widget/TextView;
    const v6, 0x7f0a01a1

    invoke-virtual {p2, v6}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v1

    check-cast v1, Landroid/view/ViewGroup;

    .line 331
    .local v1, "customViewContainer":Landroid/view/ViewGroup;
    invoke-virtual {v1}, Landroid/view/ViewGroup;->removeAllViews()V

    .line 333
    const v6, 0x7f0a00b8

    invoke-virtual {p2, v6}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    .line 334
    .local v0, "arrow":Landroid/view/View;
    iget-object v6, v3, Lcom/brixd/niceapp/activity/NiceAppSettingActivity$SettingItem;->customView:Landroid/view/View;

    if-nez v6, :cond_56

    .line 335
    iget-boolean v6, v3, Lcom/brixd/niceapp/activity/NiceAppSettingActivity$SettingItem;->showArrow:Z

    if-eqz v6, :cond_48

    const/4 v5, 0x0

    :cond_48
    invoke-virtual {v0, v5}, Landroid/view/View;->setVisibility(I)V

    .line 341
    :goto_4b
    iget-object v5, v3, Lcom/brixd/niceapp/activity/NiceAppSettingActivity$SettingItem;->title:Ljava/lang/String;

    invoke-virtual {v4, v5}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 342
    iget v5, v3, Lcom/brixd/niceapp/activity/NiceAppSettingActivity$SettingItem;->imgResId:I

    invoke-virtual {v2, v5}, Landroid/widget/ImageView;->setBackgroundResource(I)V

    .line 344
    return-object p2

    .line 337
    :cond_56
    invoke-virtual {v0, v5}, Landroid/view/View;->setVisibility(I)V

    .line 338
    iget-object v5, v3, Lcom/brixd/niceapp/activity/NiceAppSettingActivity$SettingItem;->customView:Landroid/view/View;

    invoke-virtual {v1, v5}, Landroid/view/ViewGroup;->addView(Landroid/view/View;)V

    goto :goto_4b
.end method
